class Dog {
    public String name;
    public int age;

    public void eat() {


        System.out.println(name + "吃狗粮");
    }
}
public class test {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.name = "小黑";
        dog.age = 1;
        dog.eat();
        System.out.println(dog.name);
        System.out.println(dog.age);
        System.out.println("----------");

        Dog dog2 = new Dog();
        dog.name = "小黄";
        dog.age = 1;
        dog.eat();
        System.out.println(dog.name);
        System.out.println(dog.age);
    }
}